﻿#region Using directives

using System;
using MCMLXVII.BackEnd.Services.OrganizationChart.Messages;
using MCMLXVII.Client.Common.Session;
#endregion

namespace MCMLXVII.Tools.OrganizationChart
{
    public class OrganizationNodesManager
    {


        public static msgOrganizationNodeInfo CreateNewNode(int FatherNodeID)
        {         
            string NodeName = Properties.Resources.NewNode;
            msgNewOrganizationTreeNode req = new msgNewOrganizationTreeNode(FatherNodeID, NodeName);
            msgNewOrganizationTreeItemResponse NewNode = BusinessActions.CreateNewOrganizationTreeNode(req);
            if (NewNode.NodeID != 0)
            {
                return new msgOrganizationNodeInfo(NewNode.NodeID, NodeName, FatherNodeID, null, null, ToolSession.MemberID, false, "", NewNode.UpdateSequence);
            }
            else
                return null;

        }


    }
}
